import request from '@/utils/request'
export default {
  tree (query) {
    return request({
      url: 'sot-admin-api/sys/resource/tree',
      method: 'get',
      params: query
    })
  },
  getSlaveList (query) {
    return request({
      url: 'sot-admin-api/sys/resource/list',
      method: 'get',
      params: query
    })
  },
  detail (query) {
    return request({
      url: 'sot-admin-api/sys/resource/detail',
      method: 'get',
      params: query
    })
  },
  create (data) {
    return request({
      url: 'sot-admin-api/sys/resource/create',
      method: 'post',
      data: data
    })
  },
  update (data) {
    return request({
      url: 'sot-admin-api/sys/resource/update',
      method: 'post',
      data: data
    })
  },
  delete (params) {
    return request({
      url: 'sot-admin-api/sys/resource/delete',
      method: 'delete',
      params: params
    })
  }
}
